<template>
  <el-radio-group v-model="direction">
    <el-radio label="left">居左</el-radio>
    <el-radio label="center">居中</el-radio>
    <el-radio label="right">居右</el-radio>
  </el-radio-group>
  <br /><br />
  <avue-crud :option="option"
             :data="list"></avue-crud>
</template>
<script>
export default {
  watch: {
    direction (value) {
      this.option.dialogMenuPosition = value;
    }
  },
  data () {
    return {
      direction: 'right',
      list: [{
        id: 1,
        name: '张三',
        sex: 12
      }, {
        id: 2,
        name: '李四',
        sex: 12
      }],
      option: {
        dialogMenuPosition: 'right',
        column: [{
          label: 'id',
          prop: 'id'
        }, {
          label: '姓名',
          prop: 'name'
        }, {
          label: '年龄',
          prop: 'sex'
        }]
      }
    }
  }
}
</script>